﻿#include "popdlg.h"
#include "ui_popdlg.h"

PopDlg::PopDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::PopDlg)
{
    ui->setupUi(this);
}

PopDlg::~PopDlg()
{
    delete ui;
}

PopLoading::PopLoading(QWidget *parent) :
    PopDlg(parent)
{
    this->setWindowFlags(Qt::FramelessWindowHint);

    this->setWindowTitle("Loading ...");
    this->resize(100,100);
    this->setStyleSheet("QDialog {background:rgba(255,255,255,255);}");

    QLabel *m_pLabel = new QLabel(this);
    m_pLabel->resize(this->size());
    QMovie *m_pMovie = new QMovie(":/Spinner-1s-160px.gif");
    m_pMovie->setScaledSize(this->size());
    m_pLabel->setMovie(m_pMovie);
    m_pMovie->start();

    myDebug("thread-id: "<<QThread::currentThreadId());
}

PopLoading::~PopLoading()
{
    deleteLater();
}
